<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MockVue Select Demo</title>
  <link rel="stylesheet" href="css/mock_vue_select.css">
</head>
<body>
this is a mock vue select component
<div id="select1"></div>
this is a mock vue select component
<p>Click the icon to toggle the dropdown.</p>
this is a mock vue select component
<div id="select2"></div>
this is a mock vue select component
<p>Click the icon to toggle the dropdown.</p>
<!-- <script src="js/mock_vue_select.js"></script> -->
<script>
  var script = document.createElement('script');
  script.src = 'js/mock_vue_select.js?v=' + Math.random();
  
  // 加载完成后再执行初始化代码
  script.onload = function () {
    const options = [
      { label: 'Option A', value: 'a' },
      { label: 'Option B', value: 'b' },
      { label: 'Option C', value: 'c' },
      { label: 'Another', value: 'x' },
    ];

    const container = document.getElementById('select1');
    new MockVueSelect(container, options, '请选择出生地...');

    const options2 = [
      { label: 'Option Aa', value: 'a' },
      { label: 'Option Ba', value: 'b' },
      { label: 'Option Ca', value: 'c' },
      { label: 'Anothera', value: 'x' },
    ];

    const container2 = document.getElementById('select2');
    new MockVueSelect(container2, options2, '请选择居住地...');
  };

  document.head.appendChild(script);
</script>


</body>
</html>
